<template>
<div>
  <el-table
      :data="list"
      height="200"
      stripe
      border
      style="width: 100%"
      @current-change="handleCurrentChange"
      @row-click="handleTableRow"
      highlight-current-row
    >
      <el-table-column
        prop="eventBean.eventName"
        label="事件名称"
        width="180"
      ></el-table-column>
      <el-table-column prop="conDate" label="日期" width="180"></el-table-column>
      <el-table-column
        prop="eventBean.regionBean.regionName"
        label="发生位置"
        width="180"
      ></el-table-column>
      <el-table-column
        prop="eventBean.preventionScheme"
        label="防治方案"
        width="200"
      ></el-table-column>
      <el-table-column
        prop="eventBean.disasterStage"
        label="灾情状态"
        width="200"
      ></el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      conParam:{}
    };
  },
  methods: {
    async findAll() {
      let list = await this.ajax.getSubmit("/api/consultation/findAll",this.conParam);
        console.log(list)
      this.list = list
      console.log(this.list);
    },
    handleTableRow(row) {
      console.log(row.diseaseId);
      this.diseaseId = row.diseaseId;
    },
    handleCurrentChange(val) {
      this.currentRow = val;
      console.val;
    },
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
  },
  created(){
    this.findAll()
  }
};
</script>

<style>

</style>